package com.jcl.recruit.console;

import com.jcl.recruit.console.mapper.ConsoleVerificationCodeMapper;
import com.jcl.recruit.console.model.ConsoleVerificationCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @ClassName ConsoleVerificationCode

 * @Author yyliu
 * @Date 2018/12/17 10:00
 * @Version 1.0
 **/
@Component
public class ConsoleVerificationCodeDao implements ConsoleVerificationCodeMapper {

    @Autowired
    private ConsoleVerificationCodeMapper consoleVerificationCodeMapper;


    @Override
    public ConsoleVerificationCode findOneByType(String receiver, Integer type) {
        return consoleVerificationCodeMapper.findOneByType(receiver, type);
    }

    @Override
    public ConsoleVerificationCode validateTime(String receiver, Integer type, Date abateDate) {
        return consoleVerificationCodeMapper.validateTime(receiver, type, abateDate);
    }

    @Override
    public ConsoleVerificationCode validateCode(String receiver, Integer type, String code) {
        return consoleVerificationCodeMapper.validateCode(receiver, type, code);
    }

    @Override
    public int add(ConsoleVerificationCode verificationCode) {
        return consoleVerificationCodeMapper.add(verificationCode);
    }

    @Override
    public int delete(String receiver, Integer type) {
        return consoleVerificationCodeMapper.delete(receiver, type);
    }
}
